import store from '@/store'

export const imgerror = {

  inserted: function(el, options) {
    el.onerror = () => {
      el.src = options.value
    }
  }

}
// 按钮指令显示隐藏
export const allow = {
  inserted: function(el, options) {
    const ret = store.state.user.userInfo.roles.points
    if (!ret.includes(options.value)) {
      el.style.display = 'none'
    }
  }
}
